package cn.edu.scau.cmi.guihao.factory;

import cn.edu.scau.cmi.guihao.domin.factory.InsuranceDamage;
import cn.edu.scau.cmi.guihao.domin.factory.InsuranceInjury;
import cn.edu.scau.cmi.guihao.interProgramming.factory.Insurance;

public class AllTypeInsurance {
	public static Insurance createInsurance(String type) {
		if(type=="身体受伤") {
			return new InsuranceInjury();
		}else if(type=="汽车损坏") {
			return new InsuranceDamage();
		}else {
			return null;
		}
	}
}
